package com.tuanzi.loan.web.lazy.collaborate;

import com.tuanzi.loan.business.service.collaborate.CollaborateChannelUserService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.Collaborate.CollaborateConfigListRequest;
import com.tuanzi.loan.vo.response.collaborate.CollaborateConfigListResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 15:05 2018/9/18
 * Description:
 */
public class CollaborateConfigListLazyDataModel extends BaseLazyDataModel<CollaborateConfigListRequest, CollaborateConfigListResponse> {

    private static final long serialVersionUID = 2309796618522459747L;

    private CollaborateChannelUserService collaborateChannelUserService = SpringContextHolder.getBean(CollaborateChannelUserService.class);

    public CollaborateConfigListLazyDataModel(CollaborateConfigListRequest collaborateConfigListRequest) {
        super(collaborateConfigListRequest);
    }

    @Override
    protected Page<CollaborateConfigListResponse> doLoad(PageSearcher<CollaborateConfigListRequest> pageSearcher) {
        return collaborateChannelUserService.list(pageSearcher);
    }
}
